<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use App\Libraries\vendor\um\AndroidCustomizedcast;
use App\Libraries\vendor\um\AndroidBroadcast;
class Message extends Model{


    public static function send_system($p){
        $um = new AndroidBroadcast();
        $res = $um->sendAndroidBroadcast([
            'title'=>$p['title'],
            'text'=>$p['title'],
            'data'=>$p['data'],
        ]);
        return $res;
    }

	public static function send_one($p){
		$um = new AndroidCustomizedcast();
        $res = $um->sendAndroidCustomizedcast([
            'reg_id'=>$p['uid'],
            'title'=>$p['title'],
            'text'=>$p['title'],
            'data'=>$p['data'],
        ]);
        return $res;
	}
}